package com.iot.iotplus.exception;


import com.iot.iotplus.base.ResultCode;

/**
 * @Description: 自定义API异常 ， 效验失败抛出该异常
 */
public class ApiException extends RuntimeException {
    private ResultCode errorCode;
    public ApiException(ResultCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }
    public ApiException(String message) {
        super(message);
    }
    public ApiException(Throwable cause) {
        super(cause);
    }
    public ApiException(String message, Throwable cause) {
        super(message, cause);
    }
    public ResultCode getErrorCode() {
        return errorCode;
    }
}